/*
 * Copyright (c) 2006, 2021, webrx.cn All rights reserved.
 *
 */
package cn.reflection;

/**
 * <p>Project: javaseapp - Ref4
 * <p>Powered by webrx On 2021-08-30 17:23:01
 * <p>Created by IntelliJ IDEA
 *
 * @author webrx [webrx@126.com]
 * @version 1.0
 * @since 16
 */
public class Ref4 {
    public static void main(String[] args) {
        var c1 = Student.class;
        System.out.println(c1.isRecord());//true

        //java.lang.String
        //java.lang 包下的所有对象，不需要导入，可以在任何java程序中直接使用


        // java 14 推出 record 类型 父类 java.lang.Record
        System.out.println(c1.getSuperclass().getName());

        var c2 = Color.class;
        System.out.println(c2.isEnum());//true
        //java.lang.Enum
        System.out.println(c2.getSuperclass().getName());

        var c3 = int[][].class;
        var c4 = String[].class;
        var c5 = User[].class;
        System.out.println(c3.isArray());//true
        System.out.println(c4.isArray());//true
        System.out.println(c5.isArray());//true

        //java.lang.Object
        System.out.println(c3.getSuperclass().getName());
    }
}
